const urlMap = {
  dev: '//dev.10jqka.com.cn:8080/#/',
  //对应测试环境主域名
  test: '//testm.10jqka.com.cn/vaserviece/webpage/advancedstockpool/index.html#/',
  //对应正式环境主域名
  release: '//vaserviece.10jqka.com.cn/webpage/advancedstockpool/index.html#/',
};

const bgBuy = 'rgba(255,41,41,0.20)';
const bgSell = 'rgba(16,178,70,0.20)';

export const BASE_URL = window.getAppVersion()
  ? `client://client.html?action=ymtz^webid=2804^mode=new^url=${location.protocol}${
      urlMap[process.env.VUE_APP_CURRENTMODE]
    }`
  : `${location.protocol}${urlMap[process.env.VUE_APP_CURRENTMODE]}`;

export const PORTFOLIO_LIST = {
  jrds: {
    1: {
      name: '波段策略',
      label: ['稳健型', '中期波段'],
      // 简介
      profile: 'ETF低估配置，指数跟随，景气拐点',
      // 偏好
      input: '时间换空间，分享行业与指数收益',
      imgName: 'etf1110',
      statId: 'pdt_etfzh_sy.bdcl',
      desc: '• ETF具备不惧退市、风险分散、资产清晰、品种丰富、交易成本低等优势\n• 结构性行情下，市场轮动上涨，优选契合市场风格的行业或主题etf，采用轮动投资策略,在波谷低价增仓，在波峰高价减仓，抓住行业机会，有效分享整个行业的收益，侧重波段布局\n• 市场风格单一行情下，基于估值和历史数据，精选宽基ETF或主线ETF跟踪配置，侧重中长线布局',
      id: 1,
      project_id: 0,
    },
  },
};

export const POOL_TABS = [
  {
    key: 0,
    name: '精选股票池',
    component: 'StrategyPool',
  },
  {
    key: 1,
    name: '自定义跟踪',
    component: 'TrackPool',
  },
];

export const ETF_STATUS = {
  2: '买入',
  3: '增仓',
  4: '持仓',
  6: '减仓',
  7: '清仓',
};

/**
 * 信号追踪状态
 * 1:买
 *   - 2：买
 *   - 3：增
 * 2：卖
 *   - 6：减
 *   - 7：清
 * 3:评
 */
export const TRADE_STATUS = {
  1: {
    2: {
      name: '买',
      color: '#FF2929',
      bgColor: bgBuy,
      borderColor: '#FF2929',
    },
    3: {
      name: '增',
      color: '#FF2929',
      bgColor: bgBuy,
    },
  },
  2: {
    6: {
      name: '减',
      color: '#10B246',
      bgColor: bgSell,
    },
    7: {
      name: '卖',
      color: '#10B246',
      bgColor: bgSell,
      borderColor: '#10B246',
    },
  },
  3: {
    default: {
      name: '评',
      color: '#FFB300',
      bgColor: 'rgba(255,179,0,0.20)',
    },
  },
};

